<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('Goods/index')}">商品列表</a></li>
        <li class="active"><a href="{:url('Goods/edit', ['id' => $goods['id']])}">编辑商品</a></li>
    </ul>
    <form action="{:url('Goods/editPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
        <input type="hidden" name="id" value="{$goods.id}">
        <div class="form-group">
            <label class="col-sm-2 control-label">标题</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" name="title" value="{$goods.title}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">价格</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" name="price" value="{$goods.price}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">促销价</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" name="after" value="{$goods.after}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">销售量</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" name="sales" value="{$goods.sales}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">运营类型</label>
            <div class="col-md-6 col-sm-10">
                <select name="type" class="form-control">
                    <option value="0" <eq name="goods.type" value="0">selected</eq>>自营</option>
                    <option value="1" <eq name="goods.type" value="1">selected</eq>>旗舰店</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">商品状态</label>
            <div class="col-md-6 col-sm-10">
                <select name="switch" class="form-control">
                    <option value="0" <eq name="goods.switch" value="1">selected</eq>>缺货</option>
                    <option value="1" <eq name="goods.switch" value="0">selected</eq>>上架</option>
                    <option value="2" <eq name="goods.switch" value="0">selected</eq>>下架</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">图片<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10">
                <input id="photo-1" type="hidden" name="image">
                <input id="photo-1-name" class="form-control" type="text" name="" title="图片名称" disabled readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label"></label>
            <div class="col-md-6 col-sm-10">
                <img id="photo-1-preview" width="40px">
                <a href="javascript:uploadOneImage('图片上传','#photo-1');" class="btn btn-primary">上传</a>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary js-ajax-submit">提交</button>
            </div>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>